
var uploadFileURL = "/upload/uploadFile";
	//"http://192.168.2.81/gapi/m_file/upload"; 

function createImgUploader(revElementId,inputId) {
	var fileUploader = revElementId;
	//$("#" + revElementId).addClass("input_attach_css");
	$("#" + revElementId).html(
			"<div id='" + fileUploader + "' style='width:100;height:30;font-weight: 700;'></div>");
	var uploader = new qq.FileUploader({
		'element' : $('#' + fileUploader)[0],
		'action' : uploadFileURL,
		'sizeLimit' : 5 * 1024 * 1024,
		'debug' : true,
		'multiple' : false,
		'allowedExtensions' : ['jpg','gif','png','ico','swf' ],
		'onComplete' : function(id, fileName, responseJSON) {
			if(typeof(responseJSON )=="string"){
				responseJSON= eval('(' + responseJSON + ')');
			}
			if (responseJSON.success){
				$('#' + inputId).val(responseJSON.url);
			}else{
				alert(responseJSON.err);
			}
		}
	});
}